/*
 * Copyright (C), 2002-2017, 苏宁易购电子商务有限公司
 * FileName: AreaTask.java
 * Author:   15050536
 * Date:     2017年1月6日 上午11:02:24
 * Description: //模块目的、功能描述      
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.suning.sawp.po.mainpushnew;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 大区主推任务表
 *
 * @author 15050536 石键平
 */
@Entity(name = "area_task")
public class AreaTask implements Serializable {

	/**
	 */
	private static final long serialVersionUID = -1790796034249388230L;

	/**
	 * 主键
	 */
	private Long id;

	/**
	 * 总部任务id
	 */
	private Long hqTaskId;

	/**
	 * 大区任务主题
	 */
	private String taskTopic;

	/**
	 * 分配状态 0:未分配，1：已分配，2：重新分配
	 */
	private Short distStatus;

	/**
	 * 大区编码
	 */
	private String disCode;

	/**
	 * 大区名称
	 */
	private String disName;

	/**
	 * 品类编码
	 */
	private String cateCode;

	/**
	 * 品类名称
	 */
	private String cateName;

	/**
	 * 月份
	 */
	private String month;

	/**
	 * 创建时间
	 */
	private Date createTime;

	public AreaTask() {

	}

	/**
	 * @param hqTaskId
	 * @param taskTopic
	 * @param disCode
	 * @param disName
	 * @param cateCode
	 * @param cateName
	 * @param month
	 */
	public AreaTask(Long hqTaskId, String taskTopic, String disCode, String disName, String cateCode, String cateName, String month) {
		super();
		this.hqTaskId = hqTaskId;
		this.taskTopic = taskTopic;
		this.disCode = disCode;
		this.disName = disName;
		this.cateCode = cateCode;
		this.cateName = cateName;
		this.month = month;
	}

	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "hq_task_id")
	public Long getHqTaskId() {
		return hqTaskId;
	}

	public void setHqTaskId(Long hqTaskId) {
		this.hqTaskId = hqTaskId;
	}

	@Column(name = "task_topic")
	public String getTaskTopic() {
		return taskTopic;
	}

	public void setTaskTopic(String taskTopic) {
		this.taskTopic = taskTopic;
	}

	@Column(name = "dist_status")
	public Short getDistStatus() {
		return distStatus;
	}

	public void setDistStatus(Short distStatus) {
		this.distStatus = distStatus;
	}

	@Column(name = "dis_code")
	public String getDisCode() {
		return disCode;
	}

	public void setDisCode(String disCode) {
		this.disCode = disCode;
	}

	@Column(name = "dis_name")
	public String getDisName() {
		return disName;
	}

	public void setDisName(String disName) {
		this.disName = disName;
	}

	@Column(name = "cate_code")
	public String getCateCode() {
		return cateCode;
	}

	public void setCateCode(String cateCode) {
		this.cateCode = cateCode;
	}

	@Column(name = "cate_name")
	public String getCateName() {
		return cateName;
	}

	public void setCateName(String cateName) {
		this.cateName = cateName;
	}

	@Column(name = "month")
	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((disCode == null) ? 0 : disCode.hashCode());
		result = prime * result + ((hqTaskId == null) ? 0 : hqTaskId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AreaTask other = (AreaTask) obj;
		if (disCode == null) {
			if (other.disCode != null)
				return false;
		} else if (!disCode.equals(other.disCode))
			return false;
		if (hqTaskId == null) {
			if (other.hqTaskId != null)
				return false;
		} else if (!hqTaskId.equals(other.hqTaskId))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}

}
